CC = gcc
CFLGAS = -g
LIBS = -lpthread
TARGET = dev2host_sem dev2host_spinlock dev2host_mutex dev2host_rwlock

all:${TARGET}

dev2host_sem: dev2host_sem.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
dev2host_spinlock: dev2host_spinlock.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
dev2host_mutex: dev2host_mutex.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
dev2host_mutex_4space: dev2host_mutex_4space.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
dev2host_rwlock: dev2host_rwlock.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
sem_example: sem_example.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
pthread : pthread_test.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
join_pthread : pthread_join.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
capture : capture.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
capture_data : capture_data.c
	${CC} ${CFLGAS} -rdynamic $^ -o $@ ${LIBS} 
send_data: send_data.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
write_DAC_DRAM: write_DAC_DRAM.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
read_DAC_DRAM: read_DAC_DRAM.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
pattern_check : pattern_check.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
read_bram: read_bram.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
write_bram: write_bram.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
data_gen: data_gen.c
	${CC} ${CFLGAS} $^ -o $@ ${LIBS} 
clean:
	rm -f ${TARGET}	
